package top.huxy.boot.util;

import java.util.regex.Pattern;

/**
 * @author HuXY
 * @Classname RegexUtils
 * @Description RegexUtils
 * @Date 2021/9/5 8:51
 * @Created by huxy
 */
public class RegexUtils {
    public static final String EMAIL="^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";

    public static boolean isEmail(String str){
        return Pattern.matches(EMAIL,str);
    }
}
